$(function () {
    $("#submit").on("submit", function (event) {
        var form = getFormData(this);
        $.get(form.api, {url: form.url}, function (res) {
            var data = JSON.parse(res)
            dplayer.switchVideo(
                {
                    url: data.data.url,
                }
            );
        })
        event.preventDefault();
    })
})